<?php /*a:2:{s:81:"D:\phpstudy_pro\WWW\www.xnadmin.site\app\admin\view\data_content_chip\import.html";i:1610539868;s:63:"D:\phpstudy_pro\WWW\www.xnadmin.site\app\admin\view\iframe.html";i:1588058566;}*/ ?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title><?php echo xn_cfg('base.sys_name'); ?></title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <script>
        //全局上传文件端口
        var UPLOAD_FILE_URL = "<?php echo url('upload_files/upload'); ?>";
        //全局选择文件端口
        var SELECT_FILE_URL = "<?php echo url('upload_files/select'); ?>";
    </script>
    <script src="/static/admin/js/jquery-2.0.0.min.js"></script>
    <script src="/static/admin/js/common.js"></script>
    <script src="/static/admin/js/upload.js"></script>
    <script src="/static/admin/js/webuploader.min.js"></script>
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="/static/admin/style/base.css" media="all">
    
    <style>
        .h15{height: 15px;}
    </style>
</head>
<body>
<div class="h15"></div>

<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">
    <form action="<?php echo request()->url(); ?>" method="post" class="xn_ajax" data-type="open">
        <!-- <div class="layui-form-item">
            <label class="layui-form-label">文件上传</label>
            <div class="layui-input-block">
                <div class="xn-upload-box">
                    <div class="t layui-col-md12 layui-col-space10">
                        <div class="layui-col-md8">
                            <input type="text" name="file" class="layui-input" value="">
                        </div>
                        <div class="layui-col-md4">
                            <div type="button" class="layui-btn webuploader-container" id="file" data-water="0" data-thumb="" style="width: 113px;">
                                <div class="webuploader-pick"><i class="layui-icon layui-icon-picture"></i>上传文件</div>
                                <div id="rt_rt_1ert9lr7j1ggtaark4a1llq1m4m7" style="position: absolute; inset: 0px auto auto 18px; width: 77px; height: 38px; overflow: hidden;">
                                    <input type="file" name="file" class="webuploader-element-invisible" accept="image/*"><label style="opacity: 0; width: 100%; height: 100%; display: block; cursor: pointer; background: rgb(255, 255, 255);"></label>
                                </div>
                            </div>
                        </div>
                    </div>
                    <script>
                        //$('#file').upload();
                    </script>
                </div>
            </div>
        </div> -->
        <div class="layui-form-item">
            <button type="button" class="layui-btn" id="file"><i class="layui-icon"></i>上传文件</button>
            <input class="layui-upload-file" type="file" accept="" name="file">
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" lay-submit class="layui-btn">导入</button>
            </div>
        </div>
    </form>
</div>


<script src="/static/admin/layui/layui.all.js"></script>
<script src="/static/admin/js/admin.js"></script>

<script>
    var upload = layui.upload;
    upload.render({
        elem: '#file'
        ,url: 'https://httpbin.org/post' //改成您自己的上传接口
        ,accept: 'file' //普通文件
        ,exts: 'xlsx|xls' 
        ,done: function(res){
            layer.msg('上传成功');
            console.log(res);
        }
        ,error: function(){
            layer.msg('22');
        }
    });
</script>

</body>
</html>